<template>
	<view>
		<view style="background: var(--themeBackground);">
			<appBar title="代理商学院"></appBar>
			<view class="borderbottom">
				<tabsComponent :tabsList="list" @handleTabClick="click" />
			</view>
			<view style="padding:0rpx 20rpx">
				<CourseItem :list='cureseList'></CourseItem>
			</view>
		</view>
	</view>
</template>

<script setup>
	// 引入方法
	import {
		courseListApi,
		courseDetailApi
	} from '@/api/mine.js'
	// 引入组件
	import CourseItem from './courseItem.vue';
	import {
		ref,
		onMounted,
		reactive
	} from 'vue';

	// 页码
	let pageInfo = reactive({
		pageNum: 1,
		pageSize: 10
	})
	// 课程列表
	let cureseList = ref()
	// 获取课程列表
	const courseList = async () => {
		let res = await courseListApi(pageInfo)
		console.log(res);
		cureseList.value = res.data.list
	}



	// 页面加载完毕
	onMounted(() => {
		courseList()
	})
</script>

<style>

</style>